package cn.itsource.org.mapper;

import cn.itsource.org.pojo.domain.Employee;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * 继承mapper接口
 */
public interface EmployeeMapper extends Mapper<Employee> {

    List<Employee> findManager();

    @Select("select * from t_employee where username = #{username} or email = #{username} or phone = #{username}")
    Employee findByUsernameOrEmailOrPhone(String username);

    /**
     * 查询当前店铺下面的员工
     * @return
     */
    @Select("select * from t_employee where shop_id = #{shopId}")
    List<Employee> findByShopId(Long shopId);
}
